-- GENERATED SPELL FOR [Sunfury Warlock] --


function spell0_21503(pUnit, Event) --@Incinerate,n/a--
pUnit:FullCastSpellOnTarget(32707,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21503', 2500, 1)
end

function spell1_21503(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(9613,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21503', 3000, 1)
end

function Sorts_21503(pUnit, Event)
local choix_sorts_21503 = math.random(0, 1)
if choix_sorts_21503 == 0 then
pUnit:RegisterEvent('spell0_21503', 1, 1)
end
if choix_sorts_21503 == 1 then
pUnit:RegisterEvent('spell1_21503', 1, 1)
end
end

function mob21503_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_21503', math.random(1500, 3000), 1)
end

function mob21503_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21503_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21503_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(21503, 1, 'mob21503_Action')
RegisterUnitEvent(21503, 2, 'mob21503_Leave')
RegisterUnitEvent(21503, 3, 'mob21503_Kill')
RegisterUnitEvent(21503, 4, 'mob21503_Die')
